import axios from 'axios';

// 获取代签收奶桶信息
const getMilk = id => axios.get(`/machining/v1/checkMilkForSaleterminal/${id}`).then(res => res.data)

// 签收或拒签
const postConfirmMilk = form => axios.post(`/machining/v1/confirmMilk`, form).then(res => res.data)

// 获取销售点现有牛奶信息
const get = id => axios.get(`/sale/v1/get/${id}`).then(res => res.data);

// 添加上下架、售出操作
const postMilkOperate = form => axios.post('/sale/v1/addOperate', form).then(res => res.data);

// 获取溯源信息
const getMilkHistory = id => axios.get(`/sale/v1/getMilkHistory/${id}`).then(res => res.data);

export {
    getMilk,
    postConfirmMilk,
    get,
    postMilkOperate,
    getMilkHistory,
}
